@foreach($categories as $category)
    <option value="{{ $category->id }}"
            @if(isset($select) && $select == $category->id) selected @endif>{{ str_repeat('-', $level) }} {{ $category->name }}</option>
    @if($category->children()->count() > 0)
        @include('admin.site.category.category-list', ['categories' => $category->children, 'level' => $level + 1, 'select' => isset($select) ? $select : 0 ])
    @endif
@endforeach